SpreadJS Documentation
Set the Word Wrap Formatting
SpreadJS Documentation > Developer's Guide > Managing the User Interface > Working with Cell Types > Setting a Hyperlink Cell > Set the Word Wrap Formatting

If the hypertext in a hyperlink cell is too long, you can set the word wrap formatting in order to avoid content overflow in a cell.

The image shared below depicts the effect of word wrap formatting in a hyperlink cell. After you set WordWrap, it is important to note that only the text in the "Hyperlink area" will be formatted with word wrap.

 

 

You can set the value of the wordWrap to boolean true or false which indicates whether to wrap the hyperlink or not. By default, this value is set to boolean false.

Using Code

The code shared below sets the word wrap formatting in the hyperlink cell to true.

JavaScript
Copy Code

// Set wordWrap in the hyperlink cell

spread.getSheet(0).getCell(1, 1).wordWrap(true);